<div id="right">
	
	<div class="block">
		<h3>Categories</h3>
		<div class="content">
			<ul>
				{foreach(get_cats('blog_cats') as $cat)}
				<li><a href="{category_link($cat)}">{$cat['name']}</a></li>
				{/foreach}
			</ul>
		</div>
	</div>
	
	<div class="block block_links">
		<h3>Links</h3>
		<div class="content">
			<ul>
				<?php /*
				以下方式产生的效果一样：
					{foreach(get_items('links',array('status'=>1)) as $link)} ... {/foreach}
					{foreach(sql("SELECT * FROM `end_link` WHERE `status`='1'") as $link)} ... {/foreach}
					{foreach($db->get_all("SELECT * FROM `end_link` WHERE `status`='1'") as $link)} ... {/foreach}
					*
					* get_items和 sql方法参见 end_blog/helper/common.php
					*
				*/?>
				{foreach(get_items('links',array('status'=>1)) as $link)}
				<li>
					<a class="link-name" title="{$link['description']}" href="{$link['url']}" target="_blank">{$link['name']}</a>
					<div class="link-description">{$link['description']}</div>
				</li>
				{/foreach}
			</ul>
		</div>
	</div>

</div>